package com.example.demo.controller;

import com.example.demo.entity.Customer;
import com.example.demo.entity.User;
import com.example.demo.service.CustomerService;
import com.example.demo.util.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

/**
 * (Customer)表控制层
 *
 * @author makejava
 * @since 2025-04-22 14:35:12
 */
@RestController
@RequestMapping("/customer")
public class CustomerController {
    /**
     * 服务对象
     */
    @Resource
    private CustomerService service;

    @RequestMapping(value = "/queryAll", method = RequestMethod.GET)
    public Result queryAll(Customer customer){
        return service.queryAll(customer);
    }

    @RequestMapping(value = "/insert", method = RequestMethod.GET)
    public Result insert(Customer customer){
        return service.insert(customer);
    }

    @RequestMapping(value = "/update", method = RequestMethod.GET)
    public Result update(Customer customer){
        return service.update(customer);
    }

}

